package com.yami.shop.api.controller;

import com.yami.shop.bean.model.SysMsg;
import com.yami.shop.common.response.ServerResponseEntity;
import com.yami.shop.service.SysMsgService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import static com.yami.shop.common.response.ServerResponseEntity.success;

@RestController
@RequestMapping("/sysmsg")
@Tag(description = "系统通知",name="系统通知")
public class MsgController {

    @Autowired
    private SysMsgService sysMsgService;

    @GetMapping("/list")
    @Operation(summary =  "系统通知列表", description = "系统通知列表")
    public ServerResponseEntity<List<SysMsg>> getCommentContentBy() {
        List<SysMsg> list = sysMsgService.list();
        return success(list);
    }
}
